a = [3, 4, 1, 5, 2]

for j in range(len(a)):
    min = j

    for i in range(len(a)):
        if a[i]>a[min]:
            a[i], a[min] = a[min], a[i]
 
    print(a)  

print(a)
